home *** CD-ROM | disk | FTP | other *** search
- /* $VER: 1.1 */
-
- options results /* enable return codes */
-
- if (left(address(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
-
- address 'GOLDED.1'
-
- 'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */
-
- if (RC ~= 0) then
-
- exit
-
- options failat 6 /* ignore warnings */
-
- signal on syntax /* ensure clean exit */
-
- /* ---------------------- INSERT YOUR CODE HERE ---------------------- */
-
- 'QUERY CAT'
-
- if (RESULT = "deutsch") then do
-
- STRING.sFILE = "GST-Datei laden..."
- STRING.sGST = "Symbol nachschlagen:"
- STRING.sERROR = "GST-Datei nicht gefunden."
- end
- else do
-
- STRING.sFILE = "Open GST file ..."
- STRING.sGST = "Look up this symbol:"
- STRING.sERROR = "GST file not found."
- end
-
- 'QUERY PATH VAR=PATH'
-
- R = pragma('D', PATH)
-
- GSTFILE = ""
-
- call readoptions("SAS/C")
-
- if (GSTFILE = "") then
-
- 'REQUEST FILE TITLE="' || STRING.sFILE || '" PATH="' || GSTFILE || '" VAR=GSTFILE'
-
- if (GSTFILE ~= "") then do
-
- if (exists(GSTFILE)) then do
-
- 'REQUEST STRING TITLE="SAS/C" BODY="' || STRING.sGST || '" VAR=SYMBOL'
-
- if ((RC = 0) & (SYMBOL ~= "")) then do
-
- 'RUN ASYNC CMD="gst *"' || GSTFILE || '*" *"' || SYMBOL || '*" VERBOSE"'
- end
- end
- else
- 'REQUEST PROBLEM="' || STRING.sERROR || '"'
- end
-
-
- /* ------------------------- END OF YOUR CODE ------------------------ */
-
- 'UNLOCK'
-
- exit
-
- SYNTAX:
-
- SAY "Error in line" SIGL ":" ERRORTEXT(RC)
-
- 'UNLOCK'
-
- /* /// "readoptions" */
-
- readoptions: procedure expose CONFIG. STRING. PROJECTNAME OBJFOLDER GSTFILE
-
- /* read compiler-specific options file in project folder (if any exists) */
-
- parse upper arg SOFTWARE
-
- if ((SOFTWARE = "") | (SOFTWARE = "SAS/C") | (SOFTWARE = "SAS/C-GNUMAKE")) then do
-
- if (exists("scoptions")) then do
-
- if open('HANDLE', "scoptions", 'READ') then do
-
- do until eof('HANDLE')
-
- DATA = readln('HANDLE')
-
- if (upper(left(DATA, 12)) = "PROGRAMNAME=") then do
-
- PROJECTNAME = compress(substr(DATA, 13), '"')
- end
- else if (left(DATA, 11) = "OBJECTNAME=") then
-
- OBJFOLDER = compress(substr(DATA, 12), '"')
-
- else if (left(DATA, 18) = "GLOBALSYMBOLTABLE=") then
-
- GSTFILE = compress(substr(DATA, 19), '"')
- end
-
- R = close('HANDLE')
- end
- end
- end
-
- return
-
- /* /// */
-